<?php
require_once 'kernel/common.php';

$agence_id = retrieve('GET','agence');

$Agence = $db->sql_query("SELECT * FROM immo_agence WHERE id = '". $agence_id ."'",'OBJECT');

$map->addMarkerByAddress($Agence->adresse .' '. $Agence->codepostal . ' ' . $Agence->ville,$Agence->nom,'<div class="googlemap_html"><b>'. $Agence->nom .'</b><br />' . $Agence->adresse .' <br /> '. $Agence->codepostal . ' ' . $Agence->ville .'</div>');
$header_googlemap = $map->getHeaderJS();
$header_googlemap .= $map->getMapJS();
$header_googlemap .= '<style type="text/css">v\:* {behavior:url(#default#VML);}</style>';

$smarty->assign('titre_site', $setting['titre_site'] . ' - ' . $Agence->nom );
$smarty->assign('googlemap_code', $header_googlemap);
$smarty->display($fichier_theme_header, $fichier_theme_header);

$smarty->assign('map', $map->getMap() );
$smarty->display('popup_carte_agence.tpl');
?>